Network system, server, data processing method and program

ABSTRACT

A front-end server for temporarily holding an operation request for a NAS server, which is sent from a predetermined client, is interposed between the NAS server and clients on a network. This front-end server holds information concerning a correlation among data files stored in the NAS server, optimizes the operation request received from the client based on the information, and transmits the operation request to the NAS server.

PRIORITY CLAIM

This application claims priority of Japanese Patent Application No.2003-115756, filed on Apr. 21, 2003, and entitled, “Network System,Server, Data Processing Method and Program.”

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to memory management of a computer system,and particularly, to memory management realizing efficient memoryallocation suitable for a NAS (Network Attached Storage) system.

2. Description of Related Art

Heretofore, a variety of computer systems including various types ofhardware (terminals) interconnected through a network have beenutilized. Among such computer systems, there is a system using a storagedevice (NAS: Network Attached Storage) to be used by being directlyconnected to the network. In this system, the NAS is made to function asan independent file server capable of allowing a data file (hereinafter,simply referred to as a file) to be shared among clients and the likethrough the network, and is adapted to be accessible from and usable bythe clients on the network.

FIG. 7 is a diagram schematically showing a general configuration of aNAS server. As shown in FIG. 7, the NAS sever 700 includes the hard diskdevice (HDD) 701 as storing means, the file system 702 as managing meansfor the file, which is realized as a function such as a CPU controlledby a program, and the network interface 703 for realizing a networkcommunication function. An exemplary file system 702 may be the JFS(Journal File System) from International Business Machines Corporation.

Having received a read request from a client through the networkinterface 703, the NAS server 700 reads data from the hard disk device701 under the management of the file system 702. Then, the NAS server700 returns the read data as a response to the client through thenetwork interface 703. Moreover, the NAS server 700, having received awrite request from a client, writes data into the hard disk device 701under the management of the file system 702, and notifies a completionof the write as a response to the client after the write is finished.

To improve the performance of NAS server 700, heretofore a write cachehas been provided in the NAS server 700. In data write operations, ittakes an extended amount of time to write the data into the hard diskdevice 701 due to the mechanical nature of the hard disk device 701.Accordingly, a high-speed semiconductor memory (hereinafter, referred toas a cache memory) is often used as a write cache of the file system702. The NAS server 700 temporarily stores the write data sent from theclient in the cache memory, and at this point, notifies the client ofthe write completion. In such a way, the client recognizes the writecompletion, thus making it possible for the client to move to anotherprocess without waiting for an actual completion of the write processinginto the hard disk device 701.

Moreover, the NAS server 700 writes the data accumulated in the cachememory in a way as described above into the hard disk in accordance witha load status of the hard disk device 701. By performing such control,processing efficiency of the NAS server 700 itself can be enhanced, andthe performance thereof can be improved.

Furthermore, in order to avoid losing the data accumulated in the cachememory when the NAS server 700 is down due to a cause such as anunexpected accident, a non-volatile memory such as a flash memory hasbeen used as this cache memory. In the case of using NFS as the filesystem 702, the non-volatile memory will be necessarily used for thecache memory because rules on protocol determine that a response to aclient for a write request shall be returned after recording data in anon-volatile recording medium (Stable Storage).

One example of the NAS server 700 as described above is a RAID(Redundant Array of Independent (Inexpensive) Disks) system, whichdisperses accesses by use of a plurality of hard disk devices incombination to achieve improvements of a processing speed andreliability. Also in this RAID system, the improvement of theperformance has been achieved by providing the cache memory asnon-volatile memory.

As described above, the cache memory using the non-volatile memory hasbeen generally provided in the NAS server, and as introduction methodsthereof, there have been heretofore adopted a method for introducing thecache memory as a write cache of a file system, and a method forintroducing the cache memory as a cache of the RAID system.

However, there has been a problem as below in the case of introducingthe cache memory as the write cache of the file system. Specifically, inorder that the file system utilizes the non-volatile memory as the writecache, it is necessary that the file system itself be designed to becapable of using the write cache. However, the file system for whichvarious functions such as clustering, failover and snapshot are requiredalready has a very complicated structure today. Therefore, it costs anenormous amount to change the existing file system and introduce thewrite cache. In the case of a software product realizing the NAS server,it is not preferable that the file system be changed to a great extentin order to introduce the write cache so as to meet specific hardwarebecause a burden in terms of development cost is large. Moreover, for avendor purchasing such software and selling the software in combinationwith hardware of his own, it is difficult to change the file system forreasons of technology and contract.

Furthermore, when the hardware in which the file system operates fails,this cache memory also becomes unusable simultaneously. Therefore, it isdifficult for another device to access this cache and acquire theaccumulated data for the purpose of maintenance and the like.

Meanwhile, in the case of utilizing the non-volatile memory as a part ofa disk system as in the RAID system, it is possible for the file systemto utilize the non-volatile memory completely transparently, andtherefore, such a problem as inherent in the foregoing case ofintroducing the non-volatile memory as the write cache of the filesystem does not occur. However, there has been a problem as below evenin this case. Specifically, in the case of introducing the non-volatilememory as the cache memory of the RAID system, operation requests (readand write requests) from the client are recorded in the cache memory onthe RAID after processings thereof in the file system, a buffer systemand a disk driver are finished. For this reason, great performanceimprovements in a response time to the client and a throughput of theNAS server itself cannot be expected.

In addition, the write request from the client affects a wider range ofthe file as processes are increased. Hence, when a large number of stepsare performed before the write request is recorded in the cache memory,a required memory capacity for one write processing is increased, andthus utilization efficiency of the cache memory is reduced.

SUMMARY OF THE INVENTION

In this connection, in consideration of the foregoing problems, it is anobject of the present invention to provide an effective cache system ina computer system utilized on a network.

It is another object of the present invention to realize efficientmemory management in a NAS server by use of such a cache system.

The present invention achieving the foregoing objects is realized as anetwork system including a NAS server, and a front-end server and fortemporarily holding at least one operation request for the NAS server,the operation request being sent from a client (computer or otherterminal device) via the network. Here, this front-end server ischaracterized to hold information concerning a correlation among datafiles stored in the NAS server, convert the operation request based onthis information, and transmit the converted request to the NAS server.

This front-end server functions as a cache system for the NAS server,which is interposed between the NAS server and the client, holds dataread from the NAS server based on the operation request, and responds tothe operation request received from the client by use of the holdingdata.

More specifically, this front-end server includes a cache memory forholding at least one operation request for the NAS server provided onthe network and the data read from the NAS server based on the operationrequest, a client operation processing unit for receiving the operationrequest from a client on the network to perform an operation based onthe operation request for cache data stored in the cache memory, and adata change reflection processing unit for creating at least oneoperation sequence to reflect the operation performed for the cache databy the client operation processing unit on the data file stored in theNAS server, and for transmitting the operation sequence to the NASserver.

More specifically, this client operation processing unit synthesizes aplurality of operation requests received from the client into oneoperation request, and performs an operation for the cache data.Moreover, the data change reflection processing unit merges a pluralityof operations performed for the cache data by the client operationprocessing unit into one operation to create the operation sequence.Furthermore, when a first operation for the cache data affects otheroperations held in the cache memory, the data change reflectionprocessing unit examines a dependency between the first operation andthe other operations, and creates an operation sequence for eachoperation based on information concerning this dependency between theoperations. In this case, the data change reflection processing unitdetermines the dependency between the first operation and the otheroperations based on the structure of the data files in the file systemof the NAS server.

In the present invention, Network File Systems (NFS), as described bythe Network Working Group, RFC 3010 and incorporated by reference in itsentirety herein, can be used as the communication protocol between theNAS server and the front-end server. Of the different versions of NFS,NFSv4 (NFS version 4) has a function to send a call back to an NFSclient (corresponding to the front-end server in the configuration ofthe present invention) to which management of the cache data is assignedwhen an access is made thereto from another NFS client. The use of thisfunction enables a plurality of the front-end servers to be set for theNAS server. This is because an operation by a predetermined front-endserver is notified to the other front-end servers by use of the callbackfunction of the NFSv4, thus making it possible to maintain consistencyof the operations of the front-end servers. Note that the communicationprotocol in this case is not limited to the NFSv4, and any communicationprotocol having a function to notify the operation by the predeterminedfront-end server to the other front-end servers can be used.

Furthermore, the present invention achieving the foregoing objects isalso realized as a data processing method as below, which uses acomputer connected to a network. This data processing method ischaracterized by including a step of storing, in a memory, an operationrequest for a NAS server received from a terminal device on a network, astep of converting this operation request stored in the memory based onan operation in the NAS server, and a step of transferring the convertedoperation request to the NAS server in accordance with a load status ofthe NAS server. Here, more specifically, a plurality of the operationrequests are synthesized into one operation request based on acorrelation among data files in the NAS server.

Moreover, the present invention can also be realized as a program forcontrolling a computer to function as the foregoing front-end server, ora program for allowing the computer to execute processing correspondingto each of the steps in the foregoing data processing method. Thisprogram can be provided by being stored in a magnetic disk, an opticaldisc, a semiconductor memory or other recording medium and distributed,or by being distributed through a network.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and theadvantages thereof, reference is now made to the following descriptiontaken in conjunction with the accompanying drawings.

FIG. 1 is a diagram showing an entire configuration of a network systeminto which a cache system of this embodiment is introduced.

FIG. 2 is a diagram schematically showing an example of a hardwareconfiguration of a computer device capable of realizing a front-endserver of this embodiment.

FIG. 3 is a diagram showing a functional configuration of the front-endserver according to this embodiment.

FIG. 4 is a view showing a configuration example of a cache managementtable according to this embodiment.

FIG. 5 is a flowchart explaining operations by a client operationprocessing unit in this embodiment.

FIG. 6 is a flowchart explaining operations by a data change reflectionprocessing unit in this embodiment.

FIG. 7 is a diagram schematically showing a general configuration of aNAS server.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The present invention will be described below in detail based on anembodiment shown in the accompanying drawings.

FIG. 1 is a diagram showing an entire configuration of a network systeminto which a cache system of this embodiment is introduced.

In the network system shown in FIG. 1, the front-end server 10, the NASserver 20 and the clients 30, all of which are according to theembodiment, are connected to one another through a network. In thisnetwork system, the clients 30 access the NAS server 20 through thefront-end server 10.

The front-end server 10 can be a personal computer, a workstation, orother computer devices. Meanwhile, the NAS server 20 is preferably anNAS server, such as shown and described in FIG. 7, but can alternativelybe a general computer device such as a personal computer or aworkstation. The clients 30 may be any information terminal such as acomputer device, including the personal computer or the workstation, ora PDA (Personal Digital Assistant) provided with a network function, ora cellular phone.

FIG. 2 is a diagram schematically showing an example of a hardwareconfiguration of a computer device capable of realizing the front-endserver 10.

The computer device shown in FIG. 2 includes the CPU (Central ProcessingUnit) 101 as computing means, the main memory 103 and the non-volatilememory 110 to be used as a cache memory, both of which are connected tothe CPU 101 through the M/B (motherboard) chipset 102 and the CPU bus,the video card 104 connected likewise to the CPU 101 through the M/Bchipset 102 and the AGP (Accelerated Graphics Port), the hard disk 105and the network interface 106, both of which are connected to the M/Bchipset 102 through the PCI (Peripheral Component Interconnect) bus, andthe floppy disk drive 108 and the keyboard/mouse 109, both of which areconnected to the M/B chipset 102 through the PCI bus, the bridge circuit107 and a low-speed bus such as the ISA (Industry Standard Architecture)bus.

Note that FIG. 2 shows only one example of the hardware configurationfor front-end server 10, and that other various configurations can beadopted if this embodiment is applicable thereto. For example, aconfiguration may be adopted, in which only a video memory is mountedinstead of providing the video card 104, and image data is processed bythe CPU 101. Moreover, as an external storage device, a drive for a CD-R(Compact Disc Recordable) or a DVD-RAM ((Digital Versatile Disc RandomAccess Memory) may be provided through an interface such as ATA (ATAttachment) and SCSI (Small Computer System Interface). Furthermore, aconfiguration for performing all the control via the network interfacewithout having the user interface is conceivable. In addition, aconfiguration without the hard disk and the floppy disk is alsoconceivable.

FIG. 3 is a diagram showing a functional configuration of the front-endserver 10 according to this embodiment.

As shown in FIG. 3, the front-end server 10 of this embodiment includesthe client operation processing unit 11 for receiving an operationrequest from a client 30, the data change reflection processing unit 12for performing an operation for the NAS server 20, and the cache memory13 realized by the non-volatile memory 110 shown in FIG. 2. Client 30 ispreferably coupled to front-end server 10 via a network (not shown).

In the configuration of the front-end server 10 described above, theclient operation processing unit 11 and the data change reflectionprocessing unit 12 are, for example, virtual software blocks realized bythe CPU 101 controlled by a program in FIG. 2. The program controllingthe CPU 101 can be provided by being stored in a magnetic disk, anoptical disc, a semiconductor memory or other recording medium anddistributed, or by being distributed through the network. Processings(processes) by the client operation processing unit and processings(processes) by the data change reflection processing unit 12 areindependent of each other and executable in parallel.

The client operation processing unit 11 receives an operation requestfrom the client 30 through the network interface 106 shown in FIG. 2,and processes the operation request by accessing the cache memory 13.Specifically, when the operation request is a read request, if data tobe read in accordance with the read request is cached in the cachememory 13, the client operation processing unit 11 returns the data as aresult of the read to the client 30. If the data to be read is notcached in the cache memory 13, the client operation processing unit 11accesses the NAS server 20 and transmits the read request thereto, andthen acquires read data and returns the read data to the client 30. Thedata read from the NAS server 20 in accordance with this read request iscached in the cache memory 13 as appropriate.

When the operation request from the client 30 is a write request, ifdata to be written in accordance with the write request is cached in thecache memory 13, the client operation processing unit 11 reflects a datachange in accordance with the write request on the cached data, andperforms a write completion notice to the client 30. If the data to bewritten is not cached in the cache memory 13, and if the data changecannot be performed due to an exclusive control and the like even thoughthe data is cached, the client operation processing unit 11 stores thewrite request in the cache memory 13, and performs the write completionnotice to the client 30.

Moreover, when it is possible to merge (synthesize) a plurality of theoperation requests received from the client 30, the plurality ofoperation requests, if determined by client operation processing unit 11to be compatible, can be merged into one operation request, and themerged request can be stored in the cache memory 13. For example, aplurality of write requests for a continuous area in one file, aplurality of change requests for access rights to the same file (oncondition that other operations are not affected) or the like can bemerged into one operation request. On the contrary to this, if therequested operations affect the other requested operations, such mergingis not performed. For example, when operations of write authorization,write and write inhibition are executed for the same file in this order,the write-authorizing operation and the write-inhibiting operationcannot be merged into one operation because the last write-inhibitingoperation makes inexecutable the write operation immediately therebefore. Hence, the operation requests for such operations are notmerged. Meanwhile, when operations of write authorization, write andread authorization are executed in this order, operation requests forthese operations can be merged into one operation because the lastread-authorizing operation does not affect the write operationimmediately there before.

Note that these plural processings (processes) by the client operationprocessing unit 11 can be executed in parallel.

The data change reflection processing unit 12 accesses the NAS server 20through the network interface 106 shown in FIG. 2, and reflects, on afile stored in the NAS server 20, the data change made for the data onthe cache memory 13 in accordance with the write request from the client30 and the write request stored in the cache memory 13. Such reflectionof the data change on the NAS server 20 is performed in such a mannerthat a data change operation sequence for the NAS server 20 is createdbased on the data change made for the data on the cache memory 13 orbased on the write request stored in the cache memory 13 and istransmitted to the NAS server 20, and that this data change operationsequence is executed in the NAS server 20.

Note that these plural processings (processes) created by the datachange reflection processing unit 12 can be executed in parallel in theNAS server 20. The data change reflection processing unit 12 is capableof pipelining merged plural processes and sending the pipelined mergedprocesses to the NAS server 20, where they are executed on data storedin the NAS server 20 using parallel processing techniques known to thoseskilled in the art of parallel data processing.

Moreover, based on the premise that the operations on the NAS server 20are executed by a method in which the same result as those of theprocessings performed on the cache of the front end is obtained, thedata change reflection processing unit 12 examines the dependencybetween operations affecting other operations and operations affected bythe other operations, and creates data change operation sequences suchthat the operations having such a dependency are executed under anorderly relation in accordance with the dependency. For example, achange of a directory name and a setting change of an access right tothe directory affect accesses to all of the directories and files belowthe concerned directory. Hence, a setting change of the access right tothe higher directory cannot be performed until change operations for thelower directories and files are performed. A specific processing methodin accordance with this dependency conforms to a specification ofcommunication protocol for use between the front-end server 10 and theNAS server 20.

Meanwhile, in consideration of the foregoing dependency between theoperations, this creation processing of the data change operationsequences involves optimization processings such as conversion from asynchronous operation to an asynchronous operation and improvement oflocality by a transposition of the operations, thus making it possibleto contribute to the improvement of the performance as a whole of thesystem.

The conversion from a synchronous operation to an asynchronous operationmeans that the processing for creating the data change operationsequences and transmitting the data change operation sequences to theNAS server 20 is executed in accordance with the load status of the NASserver 20 (that is, asynchronously for the operation requests from theclient 30).

The improvement of locality by a transposition of the operations meansthat a seek time of the hard disk in the NAS server 20 is reduced bytransposing the operation when operations for different files do notaffect other files even if a transposition of an operation thereof.

Note that these optimization processings are shown only as examples, andit is needless to say that various optimizations (operation conversions)realizable by interposing the cache memory 13 are executable.

It is possible to execute the processings (processes) by the clientoperation processing unit 11 and the data change reflection processingunit 12 in parallel, preferably by pipelining instructions. Moreover,each of the units can also execute a plurality of processings inparallel. The number of processings executable in parallel by the clientoperation processing unit 11 means the number of operation requests forthe data read, which can be sent simultaneously to the NAS server 20.Meanwhile, the number of processings executable in parallel by the datachange reflection processing unit 12 means the maximum number ofoperation requests for the data write, which can be sent simultaneouslyto the NAS server 20. These numbers of processings executable inparallel are set in accordance with the performance (processing speed)of the CPU 101 realizing the front-end server 10 and the storagecapacity of the non-volatile memory 110. In addition, the numbers canalso be dynamically adjusted in accordance with an arrival frequency ofthe operation requests sent from the client 30, the performance of theNAS server 20 and the like.

Moreover, in this embodiment, a cache management table is used in orderto manage a cache content of the cache memory 13 in the processings ofthe client operation processing unit 11 and data change reflectionprocessing unit 12. The foregoing parallel operations (at least theprocessings of the client operation processing unit 11 and data changereflection processing unit 12) enables simultaneous accesses made by twoor more processings as accesses to the cache management table 131.Therefore, in accessing the cache management table 131, suitableexclusive control is necessary.

FIG. 4 is a view showing a configuration example of cache managementtable 131.

One entry of this cache management table 131 indicates a state of anattribute of the directory or the file and a cached state of the data.This cache management table 131 is basically held, for example, in thenon-volatile memory 110 shown in FIG. 2. However, an entry that hasalready been reflected on the NAS server 20 and an entry to data read asprocessing for a read request may be managed by providing the cachemanagement table 131 on a volatile memory such as the main memory 103.

In the example shown in FIG. 4, in the cache management table 131, thereare prepared fields such as a handle, a receiving time, a reflectedstate, a path name, an attribute, an offset, a length, a file content,reference order management information and dependency information.

The handle is information for identifying the file or the directory, anddepends on the communication protocol to be used by the system. In areference operation as an operation based on the read request, thisinformation is included in the operation request from the client 30.Meanwhile, in an operation based on the write request and a changeoperation as an operation reflecting the cache content on the NAS server20, this information is included in the operation request from theclient 30 and the response from the NAS server 20.

The receiving time indicates a receiving time of the write request fromthe client 30.

The reflected state indicates a reflected state of the data change basedon the write request on the NAS server 20. For example, four values of“dependency resolution pending,” “unprocessed,” “under processing” and“end of processing” can be set therefore.

The path name is information (character string) indicating a location ofthe directory or the file in a tree structure of the file system of theNAS server 20. The tree structure here means a structure based onparentage in the directories and the files.

The attribute is information indicating an attribute of the file or thedirectory, and is defined by the communication protocol to be used bythe system.

The offset is information indicating a location of data to be accessedin accordance with an operation request from a head of a file stored inthe NAS server 20, and similarly, the length is information indicating alength of the data in the file.

The file content is a content of data managed by the concerned entry ofthe cache management table 131.

The reference order management information indicates a relative order ofreference in entries. Although a management method for this informationis arbitrary, for example, a method in which the reference order isshown by a bidirectional link is conceivable.

The dependency information indicates a dependency between the respectiveprocessings based on the operation requests. Although a managementmethod for this information is arbitrary, for example, a method in whicha link to a depending entry is placed in a dependency information fieldof an entry on which the depending entry depends is conceivable.

Note that the configuration of the cache management table 131 shown inFIG. 4 is shown only as an example, and that, besides the above, it ispossible to register a variety of information usable for managing thecache as appropriate. For example, links for the parentage in the filesand the directories and a hash table of file names may be registered inorder to enhance a retrieval speed. Moreover, also conceivable is amethod, in which information for estimating a future access possibilityis registered in place of the reference order management information,and this information is used in the case of selecting an object to bedeleted from the cache memory 13 and an object to be reflected on theNAS server 20.

Next, the operations of the client operation processing unit 11 and datachange reflection processing unit 12, which are executed by use of thiscache management table 131, will be described in detail.

FIG. 5 is a flowchart explaining the operations by the client operationprocessing unit 11.

As shown in FIG. 5, upon receiving an operation request from the client30 (Step 501), the client operation processing unit 11 examines whetherthe operation request is a read request or a write request.

When the received operation request is a read request, the clientoperation processing unit 11 executes a reference operation.Specifically, the client operation processing unit 11 retrieves therespective entries registered in the cache management table 131, anddetermines whether or not cache data corresponding to a handle includedin the read request is present and it is possible to create a responseto the client 30 by use of the cache data (Steps 502 and 503). If it ispossible to create the response to the client 30, the client operationprocessing unit 11 creates the response, updates the reference ordermanagement information of the entry, and returns the created response tothe client 30 (Step 504).

On the other hand, if it is impossible to create the response to theclient 30, the client operation processing unit 11 transmits aninformation acquisition request (read request of data and the like) tothe NAS server 20 in order to acquire information required for creatingthe response (Step 505). Thereafter, after acquiring a response from theNAS server 20, the client operation processing unit 11 creates aresponse to the client 30 and returns the response thereto (Step 506).Accompanied with this operation, a field for a reflected state of theentry to be registered is set at the “end of processing.” Informationacquired at this time is cached, an entry of the cache data isregistered in the cache management table 131, and thus the entry is madeusable for processing for operation requests to the same informationthereafter (Step 507). When there is no free storage area in a memoryprepared for the cache management table 131, among entries of whichreflected states are the “end of processing,” one entry is selected inLRU (Least Recently Used) order by referring to the reference ordermanagement information, and namely, one entry to which no access hasbeen made for the longest time is selected. Then, the selected entry isdeleted, and thus a free capacity is ensured, into which the entry isthen registered. When the free capacity is still short after thedeletion, the above-described selection and deletion are repeated untilthe free capacity can be ensured. Note that, instead of selecting oneentry in LRU order, an entry in which the number of accesses madethereto is estimated to be the least in the future may be selected byother technique, for example, based on the latest reference frequencyand the like. Similarly, sections regarding the selection of the entryin LRU order in the description below can be rewritten such that theother technique can be alternatively used. Moreover, in the case of theselection and the deletion of the entry for the purpose of ensuring thefree capacity, it is also conceivable to select and delete a pluralityof the entries in a lump in order to reduce execution overheads thereof.Similarly, in the case of the selection and the deletion of the entry inthe description below, the plurality of entries may be selected anddeleted in a lump.

When the operation request received from the client 30 is a writerequest, the client operation processing unit 11 executes changeprocessing. Specifically, the client operation processing unit 11retrieves the respective entries registered in the cache managementtable 131, and determines whether or not cache data corresponding to ahandle included in the write request from the client 30 is present andit is possible to apply a change of data based on the received writerequest to the cache data (Steps 502 and 508). If it is possible toapply the change of data to the cache data, the client operationprocessing unit 11 changes the data, updates the reference ordermanagement information of the entry, and transmits a completion noticeto the client 30 (Step 509).

On the other hand, if it is impossible to apply the change of data basedon the write request to the cache data, the client operation processingunit 11 registers an entry corresponding to the write request in thecache management table 131, and transmits a completion notice to theclient 30 (Step 510). A field for a reflected state of the entry is setat the “unprocessed.” When there is no free storage area in the memoryprepared for the cache management table 131, among the entries of whichreflected states are the “end of processing,” one entry is selected inLRU (Least Recently Used) order by referring to the reference ordermanagement information, deleted, and the entry is registered therein.

Note that the client operation processing unit 11 can search a pluralityof mergeable operation requests to merge the operation requests in oneoperation request in the case of applying the change of data to thecache data in Step 509, in the case of registering the entrycorresponding to the write request in the cache management table 131 inStep 510, or asynchronously with a series of the operations shown inFIG. 5.

FIG. 6 is a flowchart explaining the operations by the data changereflection processing unit 12.

The data change reflection processing unit 12 executes the processingsshown in FIG. 6 such that the number of processings executedsimultaneously can be a value in which the NAS server 20 can be operatedmost efficiently in accordance with the state of the operation load ofthe NAS server 20. In general, the larger the number of processingsexecuted simultaneously is, the more efficiently the NAS server 20 canbe operated by making full use of a parallel degree of the processings.However, if the number of processings executed simultaneously exceeds apredetermined limit, the execution efficiency is reduced conversely dueto an overhead managing the parallel processings. The suitable number ofprocessings executed simultaneously may be obtained by measurement inadvance, or may be dynamically adjusted while measuring the performanceof the NAS server 20 during the execution.

The data change reflection processing unit 12 first refers to thereference order management information and the reflected states in therespective entries of the cache management table 131, and selects oneentry of which reflected state is unreflected in LRU order (Step 601).

When the selected entry is an entry regarding a directory, next, thedata change reflection processing unit 12 verifies whether other entryaffected by a change operation for the concerned entry is present (Step602). Specifically, the data change reflection processing unit 12 refersto the cache management table 131, and retrieves such an entry regardinga directory or a file of which path name indicates that the directory orthe file is located immediately under the concerned directory. Then, thedata change reflection processing unit 12 examines whether such theentry is affected by the change operation. Here, that the entry isaffected by the change operation means that, accompanied with the changeoperation for the entry selected in Step 601, it will be necessary tochange lower directory and file thereof. For example, in the case ofchanging a directory name of a predetermined directory, accompanied withthis, it will also be necessary to change path names of lower directoryand file of the directory. In other words, entries regarding thedirectory and file as described above depend on the entry selected inStep 601. Accordingly, if an entry having such a dependency with theentry selected in Step 601 is present, the entry is detected. Ananalysis method for the dependency in the directories and the files willbe described later.

When the entry (hereinafter, referred to as a dependent entry) in thelower directory, which is affected by the change operation for the entryselected in Step 601, is not present, the data change reflectionprocessing unit 12 changes the reflected state of the entry selected inStep 601 during the processings. Then, the data change reflectionprocessing unit 12 creates a data change operation sequencecorresponding to the change content of the entry, and transmits the datachange operation sequence to the NAS server 20 (Step 603). Based on thedata change operation sequence, the NAS server 20 executes a writeoperation of the data, and then returns a response notifying a writecompletion to the front-end server 10. If the response for the datachange operation sequence is returned from the NAS server 20, thefront-end server 10 changes the reflected state of the entry to the endof processing (Step 604).

When the dependent entry affected by the change operation for the entryselected in Step 601 is present, next, the data change reflectionprocessing unit 12 examines whether or not it is necessary to reflectthe change content of the dependent entry on the corresponding file ofthe NAS server 20 (Step 605). Here, the case where it is not necessaryto reflect the change content of the dependent entry on thecorresponding file of the NAS server 20 is a case where the change tothe dependent entry becomes nullified by other subsequent operations.

When it is necessary to reflect the change content of the dependententry to the corresponding file of the NAS server 20, the data changereflection processing unit 12 registers the entry selected in Step 601in the dependency information field of the dependent entry (Step 606).When the other entry is already registered in the dependency informationfield, this means that the dependent entry has a dependency relationalso with the other entry. Accordingly, in such a case, the data changereflection processing unit 12 sequentially traces the entries registeredin the dependency information field, and registers the entry selected inStep 601 in the dependency information field if the data changereflection processing unit 12 reaches an entry which is not registeredin the dependency information field. Then, with regard to the entryselected in Step 601, the status of the reflected state is set at the“dependency resolution pending.”

On the other hand, when it is not necessary to reflect the changecontent of the dependent entry to the corresponding file of the NASserver 20, the data change reflection processing unit 12 deletes thedependent entry from the cache management table 131 (Step 607). When theother entry is registered in the dependency information field of thedependent entry, the data change reflection processing unit 12 changesthe status of the reflected state of the other entry from the“dependency resolution pending” to “unreflected.”

Here, the analysis method for the dependency in the directories and thefiles will be described.

This analysis of the dependency is executed in accordance with thespecification of the communication protocol between the front-end server10 and the NAS server 20.

When stateless (that is, without a state (information of the status ofthe directories and the files)) communication protocol such as NFSv2(NFS version 2) and NFSv3 (NFS version 3) is used for the communicationbetween the front-end server 10 and the NAS server 20, the treestructure of the file system of the NAS server 20 is constructed andmanaged in the front-end server 10, and the dependency is analyzed basedon a positional relationship of the directories and the files in thetree structure. Information required for constructing the tree structureis acquired by which the front end accesses the NAS server according toneeds. The constructed tree structure is held in the main memory 103 inFIG. 2, the non-volatile memory 110 in FIG. 2, which constitutes thecache memory 13, and the like.

In the stateless communication protocol, it is not necessary to hold, inthe client, an operation request received by the server once. It isassured that the operation request is certainly held on the server sideeven if a failure occurs in the server. A write request that is stillnot reflected (that is, pending) on the NAS server 20 though receivedfrom the client 30 is placed in the front-end server 10. It is necessaryto reflect the pending write request on the NAS server 20 even if achange operation (for example, a write-inhibiting operation for anobject file of the write request) is performed for a higher directory.Therefore, it is necessary to suitably control the order of reflectingthe change operation for the object file and the change operation forthe higher directory on the NAS sever 20. Such a necessity leads to anecessity of grasping what relationships the respective operations fromthe client 30 mutually have in the tree structure of the file system ofthe NAS server 20. Therefore, as described above, the tree structure isheld and managed in the front-end server 10.

Meanwhile, when communication protocol provided with a state, such asNFSv4 (NFS version 4), is used for the communication between thefront-end server 10 and the NAS server 20, all of the directories andfiles associated with the pending operation request are set in an openstatus (or in a cache assigned status), thus making it possible toreflect a pending change on the NAS server 20 no matter how the statusof the higher directory may be changed.

Unlike the foregoing stateless communication protocol, in thecommunication protocol provided with the state, explicit recoveryprocessing is required on the client side when the server recovers fromthe failure. Specifically, the client and the server hold an explicitconnection there between for each file and directory. When thisconnection is disconnected due to some failure, each of the client andthe server performs the explicit recovery processing. Meanwhile, as longas the connection is held on the client, it is possible to reflect thechange operation pending for each file on the server no matter how thestatus of the higher directory may be changed. Therefore, it becomesunnecessary to grasp the tree structure of the file system of the NASserver 20 in the front-end server 10 when the communication protocolhaving a state such as an NFSv4 is used. Although it is necessary tocheck whether or not a file handle affected by the change operationperformed for the directory is present, this checking can be realized byinquiring of the NAS server 20 at the time of the change operation forthe directory even if the tree structure is not held.

In any of the cases of the stateless communication protocol and thecommunication protocol provided with the state, in the processing forreflecting the change of data on the NAS server 20, the status of thedata in the NAS server 20 and the status of the data on the cache of thefront-end server 10 are managed independently of each other.Specifically, even if the change of the status of the data isunreflected on the NAS server 20, the processing is executed inconsideration of the effect of the status change in the operation to thecache on the front end.

As described above, in this embodiment, the optimization can beperformed based on the dependency between the operations in the case ofcreating the operation request for the NAS server 20 by the data changereflection processing unit 12. Next, the optimization will be describedby giving specific examples.

(A) Optimization by Merging Data Write Operation for NAS Server 20.

When the plurality of operation requests for the data write are the onesfor an area where the files are continuous, these operation requests canbe merged to create one data change operation sequence, and the NASserver 20 can be allowed to execute the created data change operationsequence. As compared with the case of creating the data changeoperation sequence for each operation request and allowing the NASserver 20 to execute the created data change operation sequence, in thiscase, a seek in the hard disk device of the NAS server 20 is reduced,and the number of change operations to be processed by the processor ofthe NAS server 20 is reduced. Therefore, the period of time required forthe processings can be shortened.

However, in this case, if the reflection of the merged change operationson the NAS server 20 is delayed, and the other operation, for example,the write-inhibiting operation of the file is reflected on the NASserver 20 prior thereto, a change operation that follows to reflect thechange operation on the NAS server 20 would result in an error. Becauseit is necessary to reflect the write request received from the client 30on the NAS server 20 without fail, such an error must be prevented.Therefore, it is necessary to explicitly control the operation of thedata write and the inhibiting operation of the data write so as not tobe exchanged in the order.

In the NFS protocol, the operation of the data write and the inhibitingoperation of the data write are operation for the same handle. Hence,when the communication protocol between the servers is the NFS protocol,the execution of the cache management per handle will tell that theoperations are performed for the same handle. Thus, the controldescribed here is enabled.

(B) Optimization by Omission of Data Write Operation for File Subjectedto Change Operation When the File is Deleted.

In an operation of an application program operating in the client 30, insome cases, such operations as described below are performed.Predetermined data is created, an interim result thereof is temporarilywritten as a file into the storage device (NAS server 20), and thecontent of the file is read in subsequent processing, followed by thedeletion of the file.

In the NFS protocol, the deletion operation of the file is defined as anoperation of the concerned file to the higher directory in the treestructure of the file system. On the other hand, only a simplecomparison of handles cannot determine the order of two handles on thetree structure, that is, which of the two handles are higher than theother. In this embodiment, the parentage (path names) on the treestructure is managed in the cache management table 131. Therefore, adependency between the operation of the data write and the deletionoperation of the file can be determined. As a result, it is madepossible to omit a reflection of such an operation of data write ofwhich effect is cancelled by the deletion operation of the file on theNAS server 20. In such a way, the processing time required forcompleting the deletion of the file is shortened.

In this embodiment, the communication protocol between the front-endserver 10 and the NAS server 20 is set as protocol provided with a cachemanagement assigning mechanism for the client 30, such as NFSv4, thusmaking it possible to assign a part of the cache management function tothe front-end server 10 without changing the functional configuration ofthe NAS server 20.

In the cache management assigning mechanism of NFSv4, it is possible toassign, to the NFS client side, a right of accessing data of a file whenthe file is opened and a right of locking a specific area on the file.If the front-end server 10 acquires the right of accessing apredetermined file by such a function, it is made possible for thefront-end server 10 replacing the NAS server 20 to execute operation forthe file, and specifically, the reference operation, the changeoperation and the locking operation.

Thus, it is made possible to execute a part of the processings for theoperation request from the client 30 only by the operation of thefront-end server 10 without depending on the NAS server 20, andtherefore, the load of the NAS server 20 can be reduced to improve athroughput thereof.

Furthermore, in this embodiment, the processing requests from theplurality of clients 30 are collected and sent to the NAS server 20 bythe function of the client cache in the front-end server 10.Specifically, as described above, the operation requests received fromthe clients 30 are merged, the change operations executable in a lump inthe case of reflecting the change of the data on the NAS server 20 aremerged into one operation to be reflected on the NAS server 20, and soon. Besides the above, in the case of using NFSv4 as the communicationprotocol between the front-end server 10 and the NAs server 20, thereference operation, the change operation and the locking operation,which are executable by the front-end server 10, can be processed by thefront-end server 10 replacing the NAS server 20. Therefore, theoperation efficiency of the NAS server 20 can be improved.

Moreover, when an access is made to the cache data of which managementis assigned to the NFS client from the other NFS clients, NFSv4 has afunction to call back to the NFS client to which the management of thecache data is assigned. Therefore, even in the case of setting theplurality of front-end servers 10 for the NAS server 20 on the network,the information concerning the operations is shared among the respectivefront-end servers 10 by the callback from the NAS server 20 to thefront-end server 10. Specifically, because the operation by thepredetermined front-end server 10 is notified to the other front-endservers 10, the consistency of the operations in the respectivefront-end servers 10 can be maintained. Hence, it is possible to realizevarious configurations, such as the plurality of front-end servers 10for one NAS server 20, and the plurality of front-end servers for theplurality of NAS servers 20, in accordance with the status of theaccesses from the clients 30 and status of the load of the NAS server20.

As described above, according to the present invention, the front-endserver is interposed between the NAS server and the clients on thenetwork, thus making it possible to provide the effective cache systemin the computer system utilized on the network.

Moreover, according to the present invention, it is made possible torealize the efficient memory management in the NAS server 20 by use ofsuch the cache system.

The present invention thus describes a network system, front-end serverand method that improves operations in a NAS server. The front-endserver, which couples a client and the NAS server, includes a cachememory for holding at least one operation request directed from a clientdevice to the NAS. The front-end server also has a client operationprocessing unit for receiving one or more operation requests from theclient. The client operation processing unit is also capable ofperforming operations, based on the operation requests, using data inthe cache memory in the front-end server. The front-end server also hasa data change reflection processing unit that can create an operationsequence, which may be either a directive to change data in the NAS or aseries of execution code, which is sent to the NAS. The client operationprocessing unit can also merge compatible instructions, received fromthe client, to create a combined operation request. The combinedoperation request can be executed either in the front-end server usingdata in the cache in the front end-server, or can be executed in the NASusing data stored in the NAS. Either way, the results of the operationof the client operation processing unit, known as operation sequences,are sent to the NAS. If the operation sequence is a series of code to beexecuted in the NAS, the client operation processing unit canrestructure the code to a pipelined form, such that the NAS can executethe operation sequence in parallel.

It should be understood that at least some aspects of the presentinvention may alternatively be implemented in a program product.Programs defining functions on the present invention can be delivered toa data storage system or a computer system via a variety ofsignal-bearing media, which include, without limitation, non-writablestorage media (e.g., CD-ROM), writable storage media (e.g., a floppydiskette, hard disk drive, read/write CD ROM, optical media), andcommunication media, such as computer and telephone networks includingEthernet. It should be understood, therefore in such signal-bearingmedia when carrying or encoding computer readable instructions thatdirect method functions in the present invention, represent alternativeembodiments of the present invention. Further, it is understood that thepresent invention may be implemented by a system having means in theform of hardware, software, or a combination of software and hardware asdescribed herein or their equivalent.

Although the preferred embodiment of the present invention has beendescribed in detail, it should be understood that various changes,substitutions and alternations can be made therein without departingfrom spirit and scope of the inventions as defined by the appendedclaims.

1. A front-end server comprising: a cache memory for holding at leastone operation request directed from a client device to a NAS (NetworkAttached Storage) server, the client device and the NAS server beingcoupled via the front-end server; a client operation processing unit forreceiving said at least one operation request from the client device,the client operation processing unit also being capable of performing anoperation based on said at least one operation request by using cachedata stored in the cache memory; and a data change reflection processingunit for creating at least one operation sequence, the created at leastone operation sequence being a result of an operation performed by theclient operation processing unit in response to the received at leastone operation request from the client device, the data change reflectionprocessing unit also being capable of transmitting the created at leastone operation sequence to the NAS server.
 2. The front-end server ofclaim 1, wherein, in response to a determination that multiple operationrequests from the client device are compatible for merging, the clientoperation processing unit synthesizes a plurality of the operationrequests received from the client device into one combined operationrequest, and the client operation processing unit executes the combinedoperation request using the cache data in the front-end server to createthe created at least one operation sequence.
 3. The front-end server ofclaim 2, wherein the created at least one operation sequence sent to theNAS server is a directive to directly change data stored in the NASserver, the directive based on results of the client operationprocessing unit executing the combined operation request using data inthe cache memory in the front-end server.
 4. The front-end server ofclaim 1, wherein in response to a determination that multiple operationrequests from the client device are compatible for merging, the clientoperation processing unit synthesizes a plurality of the operationrequests received from the client device into one combined operationrequest, and wherein the created operation sequence sent to the NASserver is the combined operation request to be executed by the NASserver using data stored in the NAS server.
 5. The front-end server ofclaim 4, wherein the series of instructions are pipelined when sent tothe NAS server for parallel execution.
 6. The front-end server of claim1, wherein the cache memory is a non-volatile recording medium.
 7. Thefront-end server of claim 1, wherein the front-end server is one of aplurality of front-end servers coupled to the NAS server via the NetworkFile System (NFS) protocol.
 8. A network system comprising: a clientdevice; a Network Attached Storage (NAS) server, and a front-end servercoupling the client device and the NAS server, the front-end servercomprising: a cache memory for holding at least one operation requestdirected from the client device to the NAS (Network Attached Storage)server; a client operation processing unit for receiving said at leastone operation request from the client device, the client operationprocessing unit also being capable of performing an operation based onsaid at least one operation request by using cache data stored in thecache memory; and a data change reflection processing unit for creatingat least one operation sequence, the created at least one operationsequence being a result of an operation performed by the clientoperation processing unit in response to the received at least oneoperation request from the client device, the data change reflectionprocessing unit also being capable of transmitting the created at leastone operation sequence to the NAS server.
 9. The network system of claim8, wherein, in response to a determination that multiple operationrequests from the client device are compatible for merging, the clientoperation processing unit synthesizes a plurality of the operationrequests received from the client device into one combined operationrequest, and the client operation processing unit executes the combinedoperation request using the cache data in the front-end server to createthe created at least one operation sequence.
 10. The network system ofclaim 9, wherein the created at least one operation sequence sent to theNAS server is a directive to directly change data stored in the NASserver, the directive based on results of the client operationprocessing unit executing the combined operation request using data inthe cache memory in the front-end server.
 11. The network system ofclaim 8, wherein in response to a determination that multiple operationrequests from the client device are compatible for merging, the clientoperation processing unit synthesizes a plurality of the operationrequests received from the client device into one combined operationrequest, and wherein the created operation sequence sent to the NASserver is the combined operation request to be executed by the NASserver using data stored in the NAS server.
 12. The network system ofclaim 11, wherein the series of instructions are pipelined when sent tothe NAS server for parallel execution.
 13. The network system of claim8, wherein the cache memory is a non-volatile recording medium.
 14. Thenetwork system of claim 8, wherein the front-end server is one of aplurality of front-end servers coupled to the NAS server via the NetworkFile System (NFS) protocol.
 15. A method comprising: holding, in a cachememory in a front-end server, at least one operation request directedfrom a client device to a NAS (Network Attached Storage) server, theclient device and the NAS server being coupled via the front-end server;receiving, at a client operation processing unit in the front-endserver, said at least one operation request from the client device;performing, in the client operation processing unit, an operation basedon said at least one operation request by using cache data stored in thecache memory; creating, in a data change reflection processing unit inthe front-end server, at least one operation sequence, the created atleast one operation sequence being a result of an operation performed bythe client operation processing unit in response to the received atleast one operation request from the client device; and transmitting, bythe data change reflection processing unit, the created at least oneoperation sequence to the NAS server.
 16. The method of claim 15,wherein, in response to a determination that multiple operation requestsfrom the client device are compatible for merging, the client operationprocessing unit synthesizes a plurality of the operation requestsreceived from the client device into one combined operation request, andthe client operation processing unit executes the combined operationrequest using the cache data in the front-end server to create thecreated at least one operation sequence.
 17. The method of claim 16,wherein the created at least one operation sequence sent to the NASserver is a directive to directly change data stored in the NAS server,the directive based on results of the client operation processing unitexecuting the combined operation request using data in the cache memoryin the front-end server.
 18. The method of claim 15, wherein in responseto a determination that multiple operation requests from the clientdevice are compatible for merging, the client operation processing unitsynthesizes a plurality of the operation requests received from theclient device into one combined operation request, and wherein thecreated operation sequence sent to the NAS server is the combinedoperation request to be executed by the NAS server using data stored inthe NAS server.
 19. The method of claim 18, wherein the series ofinstructions are pipelined when sent to the NAS server for parallelexecution.
 20. The method of claim 15, wherein the cache memory is anon-volatile recording medium.